/*
 * Copyright (c) 2022 Institute of Software Chinese Academy of Sciences (ISCAS)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package space.ao.services.account.member.dto;

import io.quarkus.runtime.annotations.RegisterForReflection;
import org.eclipse.microprofile.openapi.annotations.media.Schema;

import jakarta.validation.constraints.NotBlank;

/**
 * 创建成员的信息.
 *
 * @author suqin
 * @date 2021-10-12 21:40:10
 **/
@RegisterForReflection
public record MemberCreateInfo(@NotBlank @Schema(description = "用户绑定盒子邀请码") String inviteCode,
                               @NotBlank @Schema(description = "用户绑定盒子clientUUID") String clientUUID,
                               @NotBlank @Schema(description = "绑定手机的型号") String phoneModel,
                               @Schema(description = "绑定手机的类型") String phoneType,
                               @NotBlank @Schema(description = "用户昵称") String nickName,
                               @Schema(description = "用户申请邮箱") String applyEmail) {
  public static MemberCreateInfo of(@NotBlank String inviteCode,
                                    @NotBlank String clientUUID,
                                    @NotBlank String phoneModel,
                                    String phoneType,
                                    @NotBlank String nickName,
                                    String applyEmail) {
    return new MemberCreateInfo(inviteCode, clientUUID, phoneModel, phoneType, nickName, applyEmail);
  }
}
